package com.cmower.bb;
import java.nio.file.FileSystems;
import java.util.*;

public class ArrayListDemo {
    public static void main(String[] args) {
        List<String> alist = new ArrayList<>();
        alist.add("沉默王二");
        alist.add(0,"沉默王三");
        alist.set(0,"沉默王四");
alist.indexOf("沉默王二");
alist.lastIndexOf("沉默王二");
alist.remove(1);
alist.remove("沉默王四");

List<String> copy = new ArrayList<>(alist);
copy.add("a");
copy.add("c");
copy.add("b");
copy.add("d");
//copy.add();

Collections.sort(copy);
System.out.println(copy);

int index = Collections.binarySearch(copy, "b");


    }


}
